<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.0.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/hexo/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/hexo/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/hexo/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/hexo/images/logo.svg" color="#222">

<link rel="stylesheet" href="/hexo/css/main.css">


<link rel="stylesheet" href="/hexo/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"hf98.gitee.io","root":"/hexo/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="RIP1. 特点 距离矢量路由（distance vector route），IGP（内部网关协议，即AS内部） AS（autonomous system）自治系统 基于UDP 端口520 周期性更新（30S左右） 支持防环，但不能保证结果。  2. 度量（metric） 采用跳数作为衡量路由距离的度量（距离度量不合理，没考虑链路状态） 路由发送路由更新公告后，跳数会加一 路由最大跳数为15，16">
<meta property="og:type" content="article">
<meta property="og:title" content="RIP">
<meta property="og:url" content="http://hf98.gitee.io/hexo/2020/07/05/na/%E8%B7%AF%E7%94%B1/RIP/">
<meta property="og:site_name" content="梁汉烽的博客">
<meta property="og:description" content="RIP1. 特点 距离矢量路由（distance vector route），IGP（内部网关协议，即AS内部） AS（autonomous system）自治系统 基于UDP 端口520 周期性更新（30S左右） 支持防环，但不能保证结果。  2. 度量（metric） 采用跳数作为衡量路由距离的度量（距离度量不合理，没考虑链路状态） 路由发送路由更新公告后，跳数会加一 路由最大跳数为15，16">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-07-04T16:00:00.000Z">
<meta property="article:modified_time" content="2020-08-10T06:39:10.988Z">
<meta property="article:author" content="Liang HF">
<meta property="article:tag" content="网络">
<meta property="article:tag" content="路由协议">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://hf98.gitee.io/hexo/2020/07/05/na/%E8%B7%AF%E7%94%B1/RIP/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>RIP | 梁汉烽的博客</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/hexo/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">梁汉烽的博客</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">日常学习总结</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/hexo/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/hexo/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/hexo/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/hexo/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://hf98.gitee.io/hexo/2020/07/05/na/%E8%B7%AF%E7%94%B1/RIP/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.gif">
      <meta itemprop="name" content="Liang HF">
      <meta itemprop="description" content="普通人">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="梁汉烽的博客">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          RIP
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-07-05 00:00:00" itemprop="dateCreated datePublished" datetime="2020-07-05T00:00:00+08:00">2020-07-05</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-08-10 14:39:10" itemprop="dateModified" datetime="2020-08-10T14:39:10+08:00">2020-08-10</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/%E8%B7%AF%E7%94%B1%E4%BA%A4%E6%8D%A2/" itemprop="url" rel="index"><span itemprop="name">路由交换</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h2 id="RIP"><a href="#RIP" class="headerlink" title="RIP"></a><strong>RIP</strong></h2><h3 id="1-特点"><a href="#1-特点" class="headerlink" title="1. 特点"></a>1. <strong>特点</strong></h3><ol>
<li>距离矢量路由（distance vector route），IGP（内部网关协议，即AS内部）<br> AS（autonomous system）自治系统</li>
<li>基于UDP 端口520</li>
<li>周期性更新（30S左右）</li>
<li>支持防环，但不能保证结果。</li>
</ol>
<h3 id="2-度量（metric）"><a href="#2-度量（metric）" class="headerlink" title="2. 度量（metric）"></a>2. <strong>度量</strong>（metric）</h3><ol>
<li>采用<strong>跳数</strong>作为衡量路由距离的度量（<strong>距离度量不合理，没考虑链路状态</strong>）</li>
<li>路由发送路由更新公告后，跳数会加一</li>
<li>路由<strong>最大跳数为15，16为不可达</strong>。（删除RIP路由即将路由跳数设置为16）</li>
</ol>
<h3 id="3-RIP-v1-与-RIP-v2"><a href="#3-RIP-v1-与-RIP-v2" class="headerlink" title="3. RIP v1 与 RIP v2"></a>3. RIP v1 与 RIP v2</h3><ol>
<li><p>RIP v1</p>
<pre><code> 1. v1有类路由，不支持VLSM与CIDR（即可变长度掩码）
 2. v1采用广播形式发送路由
 3. 不支持认证</code></pre>
</li>
<li><p>RIP v2</p>
<pre><code> 1.  RIP v2,支持路由聚合以及可变长度掩码划分子网
 2. 支持广播/组播（224.0.0.9）方式发送报文
 3. 支持明文认证与MD5密文认证
 4. 支持防环路
     1. 水平分割：从某一个路由器学习到的路由规则不会再通过接口发回给该路由器。
     2. 触发更新：当路由信息发生变化时，立即向邻居设备发送触发更新报文。
     3. 毒性反转：从一个路由器学习到路由后，修改跳数为16并发回该路由器。</code></pre>
</li>
</ol>
<h3 id="4-总结"><a href="#4-总结" class="headerlink" title="4.总结"></a>4.<strong>总结</strong></h3><p>1.协议模式</p>
<pre><code>rip:开启rip进程
    version 2:开启rip v2
    network [network address]:宣告网络，指定rip运行接口与网络路由
undo rip [command]:用于修改路由走特定路径
    input:禁止接收rip数据包
    output:禁止接收rip数据包
slient-interface [interface/all]:配置接口只收不发</code></pre>
<p>2.接口模式</p>
<pre><code>rip [command]:用于指定路由与防止产生环路
    metricin[metric]：设置接收路由时增加对应度量值        
    metricout[metric]:设置发送路由时修改为对应度量值
    split-horizon:开启水平分割，默认开启
    poison-reverse:开启毒性逆转，默认关闭</code></pre>
<p>3.系统模式下</p>
<pre><code>display [rip] (int [interface] verbose):
    默认：验证rip信息
    详细：验证RIP接口的详细信息</code></pre>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/hexo/tags/%E7%BD%91%E7%BB%9C/" rel="tag"># 网络</a>
              <a href="/hexo/tags/%E8%B7%AF%E7%94%B1%E5%8D%8F%E8%AE%AE/" rel="tag"># 路由协议</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/hexo/2020/07/05/na/%E8%B7%AF%E7%94%B1/VRP/" rel="prev" title="VRP">
      <i class="fa fa-chevron-left"></i> VRP
    </a></div>
      <div class="post-nav-item">
    <a href="/hexo/2020/07/05/na/%E7%AD%96%E7%95%A5/STP/" rel="next" title="STP">
      STP <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#RIP"><span class="nav-number">1.</span> <span class="nav-text">RIP</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-%E7%89%B9%E7%82%B9"><span class="nav-number">1.1.</span> <span class="nav-text">1. 特点</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-%E5%BA%A6%E9%87%8F%EF%BC%88metric%EF%BC%89"><span class="nav-number">1.2.</span> <span class="nav-text">2. 度量（metric）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-RIP-v1-%E4%B8%8E-RIP-v2"><span class="nav-number">1.3.</span> <span class="nav-text">3. RIP v1 与 RIP v2</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-%E6%80%BB%E7%BB%93"><span class="nav-number">1.4.</span> <span class="nav-text">4.总结</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">Liang HF</p>
  <div class="site-description" itemprop="description">普通人</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/hexo/archives/">
        
          <span class="site-state-item-count">15</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/hexo/categories/">
          
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/hexo/tags/">
          
        <span class="site-state-item-count">15</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Liang HF</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/hexo/lib/anime.min.js"></script>
  <script src="/hexo/lib/velocity/velocity.min.js"></script>
  <script src="/hexo/lib/velocity/velocity.ui.min.js"></script>

<script src="/hexo/js/utils.js"></script>

<script src="/hexo/js/motion.js"></script>


<script src="/hexo/js/schemes/pisces.js"></script>


<script src="/hexo/js/next-boot.js"></script>




  















  

  

</body>
</html>
